from django.views.generic.list import ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from pos.models import Pos


class ListPosView(ListView):
    model = Pos
    queryset = Pos.objects.all().order_by("-pk")

class CreatePosView(CreateView):
    model = Pos
    success_url = "/pos/"

class UpdatePosView(UpdateView):
    model = Pos
    success_url = "/pos/"

class DeletePosView(DeleteView):
    model = Pos
    success_url = "/pos/"